<style src="./index.scss" lang="scss" scoped rel="stylesheet/scss"></style>
<template src="./index.html"></template>
<script>
export default {
    components: {
        SelectImageRadio: async () => Vue.extend( await Vue.prototype.$vFN.Components.Base.SelectImageRadio() ),
        SelectLink: async () => Vue.extend( await Vue.prototype.$vFN.Components.Base.SelectLink() ),
    },
    props: {
        // 使用者window实例 必定义
        appWindow: {
            type: Object,
            default: null,
        },
        desData: {
            type: Object,
            default: null,
        },
    },
    computed: {},
    data() {
        return {
            desFormData: {
                ...this.desData,
            },
            pageShareEnableOption: [
                {
                    label: "开启",
                    value: "open",
                },
                {
                    label: "关闭",
                    value: "close",
                },
                {
                    label: "自动",
                    value: "auto",
                },
            ],
        };
    },
    methods: {
        updateDesData() {
            console.error("updateDesData");
            this.$emit("update:desData", {
                ...this.desFormData,
            });
        },
        updateColor(type_, e) {
            this.desFormData[type_] = e;
        },
    },
    watch: {
        desFormData: {
            handler() {
                if (this.desFormData) {
                    this.updateDesData();
                }
            },
            immediate: true,
            deep: true,
        },
    },

    mounted() {},
    beforeCreate() {},
};
</script>